<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title><%= title %></title>
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="/stylesheets/style.css">
</head>
<body>

<h1><%= sitename %></h1><small><%= sitedescription %></small>

<nav>
<span><a title="主页" href="/">home</a></span>
<span><a title="存档" href="/archive">archive</a></span>
<span><a title="标签" href="/tags">tags</a></span>
<span><a title="友情链接" href="/links">links</a></span>
<% if(locals.user){ %>
  <span><a title="发表" href="/post">post</a></span>
  <span><a title="管理" href="/admin">Admin</a></span>
  <span><a title="登出" href="/logout">logout</a></span>
<% } else { %>
  <span><a title="登录" href="/login">login</a></span>
<% } %>
<form action="/search" method="GET" ><input type="text" name="keyword" placeholder="SEARCH" class="search" /></form>
</nav>

<article>
<header>
<h3><%= pagename %></h3>
</header>
<% if (locals.success) { %>
  <div ><%= locals.success %></div>
<% } %>
<% if (locals.error) { %>
  <div><%= locals.error %> </div>
<% } %>